package symbols;

import java.util.HashMap;
import java.util.Map;

public class SymbolDictionary {
	static private int first_free = 0;
	static private Map<String, Integer> map = new HashMap<String, Integer>();
	static public Integer getSymbolId(Symbol sym)  {
		String string = sym.getName();
		Integer val = map.get(string);
		if(val != null) return val;
		else  {
			first_free++;
			map.put(string, first_free);
			return first_free;
		}
	}
	
}
